//引入重置样式
require('../../assets/css/reset.css')

//引入公共样式
require('../../assets/css/property.css')

//引入页面样式
require('./go.less')

//引入封装的dom
require('../../assets/js/dom.js')

//复用的basic
require('../../assets/css/basic.less')

//等待dom加载完毕之后操作dom
document.ready(() => {
    //获取dom
    const countdown = document.querySelector('#countdown')

    //调用计时器
    count();

    //封装函数
    function count() {
        //定义事件
        let time = 3;
        //计时器
        let timer = setInterval(() => {
            //时间为1 跳转到首页
            if (time === 1) {
                clearInterval(timer);
                window.location.href = './record.html';
                return
            }
            time--;
            countdown.innerHTML = `${time}`;
        }, 1000);
    }
})